/*     */ package com.lmpop.trade.ti_normal_biz_model;
/*     */ 
/*     */ import com.lmpop.frame.QueryList;
/*     */ import com.lmpop.frame.SysMap;
/*     */ import com.lmpop.frame.TradeInterf;
/*     */ import com.lmpop.frame.dao.DbmInterf;
/*     */ import com.lmpop.frame.exp.ApplicationException;
/*     */ import com.lmpop.updateHtml.parseXml.Config;
/*     */ import java.util.Hashtable;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ 
/*     */ public class Ti_normal_biz_modelInfo
/*     */   implements TradeInterf
/*     */ {
/*     */   QueryList queryList;
/*     */   Config conf;
/*     */ 
/*     */   public Ti_normal_biz_modelInfo()
/*     */   {
/*  19 */     this.queryList = new QueryList();
/*  20 */     this.conf = new Config();
/*  21 */     this.conf.init();
/*     */   }
/*     */ 
/*     */   public SysMap insert(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  31 */     Ti_normal_biz_model ti_normal_biz_model = new Ti_normal_biz_model();
/*  32 */     ti_normal_biz_model.setBiz_id(map.getString("biz_id"));
/*  33 */     ti_normal_biz_model.setCust_id(map.getString("cust_id"));
/*  34 */     ti_normal_biz_model.setBiz_type(map.getString("biz_type"));
/*  35 */     ti_normal_biz_model.setModel_id(map.getString("model_id"));
/*  36 */     ti_normal_biz_model.setModel_name(map.getString("model_name"));
/*  37 */     ti_normal_biz_model.setSpecification(map.getString("specification"));
/*  38 */     ti_normal_biz_model.setWeight(map.getString("weight"));
/*  39 */     ti_normal_biz_model.setPack_type(map.getString("pack_type"));
/*  40 */     ti_normal_biz_model.setContent(map.getString("content"));
/*  41 */     ti_normal_biz_model.setMax_supply(map.getString("max_supply"));
/*     */ 
/*  43 */     ti_normal_biz_model.setMini_biz_sum(map.getString("mini_biz_sum"));
/*  44 */     ti_normal_biz_model.setOut_biz_fee(map.getString("out_biz_fee"));
/*  45 */     ti_normal_biz_model.setMiddle_fee(map.getString("middle_fee"));
/*  46 */     ti_normal_biz_model.setLog_fee(map.getString("log_fee"));
/*  47 */     ti_normal_biz_model.setSale_fee(map.getString("sale_fee"));
/*     */ 
/*  49 */     ti_normal_biz_model.setBiz_price(map.getString("biz_price"));
/*  50 */     ti_normal_biz_model.setRsrv_str1(map.getString("rsrv_str1"));
/*  51 */     ti_normal_biz_model.setRsrv_str2(map.getString("rsrv_str2"));
/*  52 */     ti_normal_biz_model.setRsrv_str3(map.getString("rsrv_str3"));
/*  53 */     ti_normal_biz_model.setRsrv_str4(map.getString("rsrv_str4"));
/*  54 */     ti_normal_biz_model.setRsrv_str5("0");
/*  55 */     ti_normal_biz_model.setRsrv_str6(map.getString("rsrv_str6"));
/*  56 */     ti_normal_biz_model.setRsrv_str7(map.getString("rsrv_str7"));
/*  57 */     ti_normal_biz_model.setRsrv_str8(map.getString("rsrv_str8"));
/*  58 */     ti_normal_biz_model.setRsrv_str9(map.getString("rsrv_str9"));
/*  59 */     ti_normal_biz_model.setIn_date(map.getString("in_date"));
/*  60 */     ti_normal_biz_model.setUser_id(map.getString("user_id"));
/*  61 */     ti_normal_biz_model.setRemark(map.getString("remark"));
/*     */ 
/*  63 */     String result_code = "0";
/*     */     try {
/*  65 */       insert(dbmMgr, ti_normal_biz_model);
/*     */     } catch (ApplicationException e) {
/*  67 */       e.printStackTrace();
/*  68 */       result_code = "1";
/*     */     }
/*  70 */     map.setString("result_code", result_code);
/*  71 */     return map;
/*     */   }
/*     */ 
/*     */   public void insert(DbmInterf dbmMgr, Ti_normal_biz_model ti_normal_biz_model)
/*     */     throws ApplicationException
/*     */   {
/*  80 */     dbmMgr.update("insertTi_normal_biz_model", ti_normal_biz_model);
/*     */   }
/*     */ 
/*     */   public SysMap delete(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  90 */     String pkid_string = map.getString("pkid");
/*  91 */     String result_code = "0";
/*     */     try {
/*  93 */       if (!pkid_string.equals("")) {
/*  94 */         String[] pkStr = pkid_string.split("\\|");
/*  95 */         List list = null;
/*  96 */         String publish_date = "";
/*  97 */         for (int i = 0; i < pkStr.length; i++) {
/*  98 */           if (pkStr[i].equals(""))
/*     */             continue;
/* 100 */           delete(dbmMgr, pkStr[i]);
/*     */         }
/*     */       }
/*     */     }
/*     */     catch (ApplicationException e)
/*     */     {
/* 106 */       e.printStackTrace();
/* 107 */       result_code = "1";
/*     */     }
/* 109 */     map.setString("result_code", result_code);
/* 110 */     return map;
/*     */   }
/*     */ 
/*     */   public void delete(DbmInterf dbmMgr, String pkid)
/*     */     throws ApplicationException
/*     */   {
/* 119 */     dbmMgr.update("deleteTi_normal_biz_model", pkid);
/*     */   }
/*     */ 
/*     */   public SysMap update(DbmInterf dbmMgr, SysMap map)
/*     */   {
/* 129 */     Ti_normal_biz_model ti_normal_biz_model = new Ti_normal_biz_model();
/* 130 */     ti_normal_biz_model.setModel_id(map.getString("model_id"));
/* 131 */     ti_normal_biz_model.setModel_name(map.getString("model_name"));
/* 132 */     ti_normal_biz_model.setSpecification(map.getString("specification"));
/* 133 */     ti_normal_biz_model.setWeight(map.getString("weight"));
/* 134 */     ti_normal_biz_model.setPack_type(map.getString("pack_type"));
/* 135 */     ti_normal_biz_model.setContent(map.getString("content"));
/* 136 */     ti_normal_biz_model.setMax_supply(map.getString("max_supply"));
/*     */ 
/* 138 */     ti_normal_biz_model.setMini_biz_sum(map.getString("mini_biz_sum"));
/* 139 */     ti_normal_biz_model.setOut_biz_fee(map.getString("out_biz_fee"));
/* 140 */     ti_normal_biz_model.setMiddle_fee(map.getString("middle_fee"));
/* 141 */     ti_normal_biz_model.setLog_fee(map.getString("log_fee"));
/* 142 */     ti_normal_biz_model.setSale_fee(map.getString("sale_fee"));
/*     */ 
/* 144 */     ti_normal_biz_model.setBiz_price(map.getString("biz_price"));
/* 145 */     ti_normal_biz_model.setRsrv_str1(map.getString("rsrv_str1"));
/* 146 */     ti_normal_biz_model.setRsrv_str2(map.getString("rsrv_str2"));
/* 147 */     ti_normal_biz_model.setRsrv_str3(map.getString("rsrv_str3"));
/* 148 */     ti_normal_biz_model.setRsrv_str4(map.getString("rsrv_str4"));
/* 149 */     ti_normal_biz_model.setRsrv_str5(map.getString("rsrv_str5"));
/* 150 */     ti_normal_biz_model.setRsrv_str6(map.getString("rsrv_str6"));
/* 151 */     ti_normal_biz_model.setRsrv_str7(map.getString("rsrv_str7"));
/* 152 */     ti_normal_biz_model.setRsrv_str8(map.getString("rsrv_str8"));
/* 153 */     ti_normal_biz_model.setRsrv_str9(map.getString("rsrv_str9"));
/*     */ 
/* 155 */     String result_code = "0";
/*     */     try {
/* 157 */       update(dbmMgr, ti_normal_biz_model);
/*     */     }
/*     */     catch (ApplicationException e) {
/* 160 */       e.printStackTrace();
/* 161 */       result_code = "1";
/*     */     }
/* 163 */     map.setString("result_code", result_code);
/* 164 */     return map;
/*     */   }
/*     */ 
/*     */   public void update(DbmInterf dbmMgr, Ti_normal_biz_model ti_normal_biz_model)
/*     */     throws ApplicationException
/*     */   {
/* 173 */     dbmMgr.update("updateTi_normal_biz_model", ti_normal_biz_model);
/*     */   }
/*     */ 
/*     */   public List getListByPage(Object obj, int start, int limit)
/*     */   {
/* 184 */     Map ti_normal_biz_model = (Hashtable)obj;
/* 185 */     if (start == 0)
/* 186 */       start = 0;
/*     */     else {
/* 188 */       start = (start - 1) * limit;
/*     */     }
/* 190 */     ti_normal_biz_model.put("start", Integer.valueOf(start));
/* 191 */     ti_normal_biz_model.put("limit", Integer.valueOf(limit));
/* 192 */     return this.queryList.getList("getListByTi_normal_biz_modelPage", ti_normal_biz_model);
/*     */   }
/*     */ 
/*     */   public int getCountByObj(Object obj)
/*     */   {
/* 204 */     Map ti_normal_biz_model = (Hashtable)obj;
/* 205 */     List list = this.queryList.getList("getCountByObjTi_normal_biz_model", ti_normal_biz_model);
/* 206 */     int count = 0;
/* 207 */     if ((list != null) && (list.size() > 0)) {
/* 208 */       Hashtable newsMap = (Hashtable)list.get(0);
/* 209 */       if ((newsMap.get("count") != null) && (!newsMap.get("count").toString().equals(""))) {
/* 210 */         count = Integer.parseInt(newsMap.get("count").toString());
/*     */       }
/*     */     }
/* 213 */     return count;
/*     */   }
/*     */ 
/*     */   public List getListByPk(String pk)
/*     */   {
/* 223 */     return this.queryList.getList("getTi_normal_biz_modelByPk", pk);
/*     */   }
/*     */ 
/*     */   public List getListByState(Object obj) {
/* 227 */     Map ti_normal_biz_model = (Hashtable)obj;
/* 228 */     return this.queryList.getList("getTi_normal_biz_modelByState", ti_normal_biz_model);
/*     */   }
/*     */ 
/*     */   public SysMap updateRsrv_str5(DbmInterf dbmMgr, SysMap map)
/*     */   {
/* 233 */     Ti_normal_biz_model ti_normal_biz_model = new Ti_normal_biz_model();
/*     */ 
/* 235 */     String pkid_string = map.getString("pkid");
/* 236 */     String state_code = map.getString("up_operating");
/* 237 */     ti_normal_biz_model.setRsrv_str5(state_code);
/* 238 */     String result_code = "0";
/*     */     try {
/* 240 */       if (!pkid_string.equals("")) {
/* 241 */         String[] pkStr = pkid_string.split("\\|");
/* 242 */         for (int i = 0; i < pkStr.length; i++)
/* 243 */           if (!pkStr[i].equals("")) {
/* 244 */             ti_normal_biz_model.setModel_id(pkStr[i]);
/* 245 */             updateRsrv_str5(dbmMgr, ti_normal_biz_model);
/*     */           }
/*     */       }
/*     */     }
/*     */     catch (ApplicationException e) {
/* 250 */       e.printStackTrace();
/* 251 */       result_code = "1";
/*     */     }
/* 253 */     map.setString("result_code", result_code);
/* 254 */     return map;
/*     */   }
/*     */ 
/*     */   public void updateRsrv_str5(DbmInterf dbmMgr, Ti_normal_biz_model ti_normal_biz_model)
/*     */     throws ApplicationException
/*     */   {
/* 263 */     dbmMgr.update("updateRsrv_str5", ti_normal_biz_model);
/*     */   }
/*     */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.trade.ti_normal_biz_model.Ti_normal_biz_modelInfo
 * JD-Core Version:    0.6.0
 */